import request from "../util/request";

/**
 * 获取部门列表
 */
export const list = function () {
    return request.get(`/depart/list`)
}

/**
 * 保存部门信息
 * @param department
 * @returns {Promise<AxiosResponse<any>>}
 */
export const save = function (department) {
    return request.put('/depart/save', department)
}

/**
 * 删除部门
 * @param id
 * @returns {Promise<AxiosResponse<any>>}
 */
export const del = function (id) {
    return request.delete(`/depart/delete/${id}`)
}